home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / applications / wp / textra16.lha / Textra116 / Scripts / SASC_Scripts / CTRLN.textra < prev    next >
Encoding:
Text File  |  1993-11-25  |  1.3 KB  |  49 lines

  1. /* ARexx macro for Textra & SAS/C
  2.  
  3.    'Next Error'
  4.  
  5.    Nothing fancy.  Just ask SCMSG for the Next error in its list.
  6. */
  7.  
  8. options failat 21
  9.  
  10. if (~show('P',SC_SCMSG)) then do
  11.     address command 'run <nil: >nil: SCMSG'
  12.     address command waitforport SC_SCMSG
  13. end
  14.  
  15. address SC_SCMSG        /* Talk to the SAS/C Message Browser.  Assumes
  16.                            SCMSG is already running... */
  17.  
  18. 'NEXT'
  19.  
  20. if (rc < 20) then do    /* Move to the "Next" error message, while there's
  21.                            one to move to... */
  22.  
  23.     options results     /* We *want* results. */
  24.  
  25.     'FILE'              /* Get the name of the file this error occurred in... */
  26.  
  27.     file = result       /* ... and save it. */
  28.  
  29.     'LINE'              /* Get the line number this error occurred on... */
  30.  
  31.     line = result       /* ... and save it. */
  32.  
  33.     options             /* We're not interested in results anymore. :-) */
  34.  
  35.     address TEXTRA          /* Talk to Textra again. */
  36.  
  37.     openfile file       /* Tell Textra to open the file, or pop the window
  38.                            with this file in it to the front. */
  39.  
  40.     gotoxy1 1 line      /* Tell Textra to put the cursor on the offending
  41.                            line. */
  42. end
  43. else do
  44.     address TEXTRA
  45.  
  46.     notify 'a'x||"NO MORE ERRORS!  (Bottom of error list reached.)"
  47. end
  48.  
  49.